jQuery(document).ready(function($){init();BODY=$('body');function init(){init_run_gmap_openevc();fullheight_img_reset();} BODY.on('click') BODY.on('click','.evolbclose',function(){LIGHTBOX=$(this).closest('.evo_lightbox');closing_lightbox(LIGHTBOX);});$(document).on('click',function(event){if($(event.target).hasClass('evo_content_inin')){closing_lightbox($(event.target).closest('.evo_lightbox'));}});function closing_lightbox(lightboxELM){if(!lightboxELM.hasClass('show'))return false;Close=(lightboxELM.parent().find('.evo_lightbox.show').length==1)?true:false;lightboxELM.removeClass('show');$('body').trigger('lightbox_before_event_closing',[lightboxELM]);setTimeout(function(){lightboxELM.find('.evo_lightbox_body').html('');if(Close){$('body').removeClass('evo_overflow');$('html').removeClass('evo_overflow');} $('body').trigger('lightbox_event_closing',[lightboxELM]);},500);} $('body').on('evolightbox_show',function(){$('.evo_lightboxes').show();$('body').addClass('evo_overflow');$('html').addClass('evo_overflow');$('body').trigger('evolightbox_opened');});$('body').on('click','.eventon_events_list .desc_trig',function(event){var obj=$(this);var attr=obj.closest('.evo_lightbox').attr('data-cal_id');if(typeof attr!==typeof undefined&&attr!==false){var cal_id=attr;var cal=$('#'+cal_id);}else{var cal=obj.closest('.ajde_evcal_calendar');} var evodata=cal.find('.evo-data');click_sinev_box=(obj.closest('.eventon_single_event').length>0&&evodata.data('exturl'))?true:false;event_id=obj.closest('.eventon_list_event').data('event_id');var cal_ux_val=evodata.data('ux_val');var accord__=evodata.data('accord');var ux_val=obj.data('ux_val');var exlk=obj.data('exlk');if(cal_ux_val!=''&&cal_ux_val!==undefined&&cal_ux_val!='0'){ux_val=cal_ux_val;} console.log(cal_ux_val+' '+ux_val);if(ux_val=='3'){event.preventDefault();EVO_LIGHTBOX=$('.evo_lightbox.eventcard');LIGHTBOX_body=EVO_LIGHTBOX.find('.evo_lightbox_body');repeat_interval=parseInt(obj.closest('.eventon_list_event').data('ri'));repeat_interval=(repeat_interval)?repeat_interval:'0';EVO_LIGHTBOX.find('.evo_pop_body').show();fullheight_img_reset();LIGHTBOX_body.html('');var event_list=obj.closest('.eventon_events_list');var content=obj.closest('.eventon_list_event').find('.event_description').html();var content_front=obj.html();var _content=$(content).not('.evcal_close');if(event_list.hasClass('evortl')){EVO_LIGHTBOX.find('.evo_popin').addClass('evortl');EVO_LIGHTBOX.addClass('evortl');} LIGHTBOX_body.append('
'+content_front+'
').append(_content);LIGHTBOX_body.attr('class','evo_lightbox_body eventon_list_event evo_pop_body evcal_eventcard event_'+event_id+'_'+repeat_interval);var this_map=LIGHTBOX_body.find('.evcal_gmaps');var idd=this_map.attr('id');this_map.attr({'id':idd+'_evop'});EVO_LIGHTBOX.addClass('show');$('body').trigger('evolightbox_show');obj.evoGenmaps({'_action':'lightbox','cal':cal,'mapSpotId':idd+'_evop'});fullheight_img_reset();bgcolor=$('.evo_pop_body').find('.evcal_cblock').attr('data-bgcolor');$('.evo_pop_body').find('.evopop_top').css({'border-left':'3px solid '+bgcolor});if(obj.data('runjs')){$('body').trigger('evo_load_single_event_content',[event_id,obj]);} $('body').trigger('evolightbox_end');return false;}else if(ux_val=='4'){if(obj.attr('href')!=''&&obj.attr('href')!==undefined){return;}else{var url=obj.parent().siblings('.evo_event_schema').find('a').attr('href');if(obj.attr('target')=='_blank'){window.open(url);}else{window.open(url,'_self');} return false;}}else if(ux_val=='2'){var url=obj.parent().siblings('.evo_event_schema').find('a').attr('href');if(click_sinev_box){event.preventDefault();return false;} if(url!==undefined&&url!=''){if(obj.attr('target')=='_blank'){var win=window.open(url,'_blank');win.focus();}else{window.open(url,'_self');} event.preventDefault();} return true;}else if(ux_val=='X'){return false;}else if(ux_val=='none'){return false;}else{if(exlk=='1'&&ux_val!='1'){if(obj.attr('href')!=''&&obj.attr('href')!==undefined){return;}else{var url=obj.siblings('.evo_event_schema').find('a').attr('href');if(obj.attr('target')=='_blank'){window.open(url);}else{window.open(url,'_self');} event.preventDefault();return false;}}else{var event_box=obj.closest('.eventon_list_event');var click_item=event_box.find('.event_description');if(click_item.hasClass('open')){event_box.removeClass('open');click_item.slideUp().removeClass('open');}else{if(accord__=='1'){cal.find('.eventon_list_event').removeClass('open');cal.find('.event_description').slideUp().removeClass('open');} event_box.addClass('open');click_item.slideDown().addClass('open');} if(obj.attr('data-gmstat')!='1'){obj.attr({'data-gmstat':'1'});obj.evoGenmaps({'fnt':2});} if(obj.data('runjs')){$('body').trigger('evo_load_single_event_content',[event_id,obj]);} return false;}}});function init_run_gmap_openevc(delay){$('.ajde_evcal_calendar').each(function(){if($(this).find('.evo-data').data('evc_open')=='1'){$(this).find('.desc_trig').each(function(){if(delay!=''&&delay!==undefined){$(this).evoGenmaps({'fnt':2,'delay':delay});}else{$(this).evoGenmaps({'fnt':2});}});}});} $('.ajde_evcal_calendar.bub').on('mouseover','.eventon_list_event',function(){O=$(this);LIST=O.closest('.eventon_events_list');title=O.find('.evcal_event_title').html();p=O.position();LIST.append(''+title+"");B=LIST.find('.evo_bub_box');l=p.left;t=p.top-B.height()-30;LM=LIST.width();tl=p.left+B.width()+O.width();if(tl>LM){l=l-B.width()+O.width()-20;} B.css({'top':t,'left':l});LIST.find('.evo_bub_box').addClass('show');}).on('mouseout',function(){B=$(this).find('.evo_bub_box').remove();});$('body').on('click','.evocmd_button',function(event){event.preventDefault();event.stopPropagation();href=$(this).data('href');if($(this).data('target')=='yes'){window.open(href,'_blank');}else{window.location=href;}});$('body').on('click','.evo-gototoday-btn',function(){var obj=$(this);var calid=obj.closest('.ajde_evcal_calendar').attr('id');var evo_data=$('#'+calid).find('.evo-data');evo_data.attr({'data-cmonth':obj.data('mo'),'data-cyear':obj.data('yr'),});$('body').trigger('evo_goto_today',[calid,evo_data]);ajax_post_content(evo_data.attr('data-sort_by'),calid,'none','today');obj.fadeOut();});$('body').on('evo_main_ajax',function(event,calendar,evodata,ajaxtype){if(ajaxtype!='sorting'&&ajaxtype!='filering') calendar.find('.evo-gototoday-btn').fadeIn();});$('body').on('evo_main_ajax_complete',function(event,calendar,evodata){var today=calendar.find('.evo-gototoday-btn');if(evodata.attr('data-cmonth')==today.attr('data-mo')&&evodata.attr('data-cyear')==today.attr('data-yr')){calendar.find('.evo-gototoday-btn').fadeOut();}});$('.ajde_evcal_calendar').on('click','.evo-jumper-btn',function(){$(this).parent().siblings().find('.evo_j_container').slideToggle();});$('.evo_j_dates').on('click','a',function(){var val=$(this).attr('data-val'),type=$(this).parent().parent().attr('data-val'),container=$(this).closest('.evo_j_container'),calOBJ=$(this).closest('.ajde_evcal_calendar');cal_resets(calOBJ);if(type=='m'){container.attr({'data-m':val});}else{container.attr({'data-y':$(this).html()});} $(this).parent().find('a').removeClass('set');$(this).addClass('set');if(container.attr('data-m')!==undefined&&container.attr('data-y')!==undefined){var calid=calOBJ.attr('id');var evo_data=$('#'+calid).find('.evo-data');evo_data.attr({'data-cmonth':container.attr('data-m'),'data-cyear':container.attr('data-y'),});ajax_post_content(evo_data.attr('data-sort_by'),calid,'none','jumper');if(container.data('expj')=='no') container.delay(2000).slideUp();}});function change_jumper_set_values(cal_id){var evodata=$('#'+cal_id).find('.evo-data');var ej_container=$('#'+cal_id).find('.evo_j_container');var new_month=evodata.attr('data-cmonth');var new_year=evodata.attr('data-cyear');ej_container.attr({'data-m':new_month});ej_container.find('.evo_j_months p.legend a').removeClass('set').parent().find('a[data-val='+new_month+']').addClass('set');ej_container.find('.evo_j_years p.legend a').removeClass('set').parent().find('a[data-val='+new_year+']').addClass('set');} function cal_resets(calOBJ){console.log('tt');calargs=$(calOBJ).find('.cal_arguments');calargs.attr('data-show_limit_paged',1);} $('.eventon_events_list').on('click','.evcal_close',function(){$(this).closest('.evcal_eventcard').slideUp().removeClass('open');});if($('.ajde_evcal_calendar').hasClass('evcal_widget')){cal.find('.evcal_gmaps').each(function(){var gmap_id=obj.attr('id');var new_gmal_id=gmap_id+'_widget';obj.attr({'id':new_gmal_id})});} $('body').on('click','.evoShow_more_events',function(){OBJ=$(this);var ReDir=OBJ.data('dir');if(ReDir!='0'){window.location=ReDir;return false;} var evCal=OBJ.closest('.ajde_evcal_calendar');var evoData=evCal.find('.evo-data');if(OBJ.data('ajax')=='yes'){calargs=evCal.find('.cal_arguments');CURRENT_PAGED=parseInt(calargs.attr('data-show_limit_paged'));calargs.attr('data-show_limit_paged',CURRENT_PAGED+1);var sort_by=evoData.attr('data-sort_by');cal_id=evCal.attr('id');ajax_post_content(sort_by,cal_id,'none','paged');}else{var event_count=parseInt(evoData.data('ev_cnt'));var show_limit=evoData.data('show_limit');var eventList=OBJ.parent();var allEvents=eventList.find('.eventon_list_event').length;var currentShowing=eventList.find('.eventon_list_event:visible').length;for(x=1;x<=event_count;x++){var inde=currentShowing+x-1;eventList.find('.eventon_list_event:eq('+inde+')').slideDown();} if(allEvents>currentShowing&&allEvents<=(currentShowing+event_count)){$(this).fadeOut();}}});$('body').find('.evo_tab_container').each(function(){$(this).find('.evo_tab_section').each(function(){if(!$(this).hasClass('visible')){$(this).addClass('hidden');}});});$('body').on('click','ul.evo_tabs li',function(){tab=$(this).data('tab');tabsection=$(this).closest('.evo_tab_view').find('.evo_tab_container');tabsection.find('.evo_tab_section').addClass('hidden').removeClass('visible');tabsection.find('.'+tab).addClass('visible').removeClass('hidden');$(this).parent().find('li').removeClass('selected');$(this).addClass('selected');});if($('body').find('.evo_layout_changer').length>0){$('body').find('.evo_layout_changer').each(function(item){if($(this).parent().hasClass('boxy')){$(this).find('.fa-th-large').addClass('on');}else{$(this).find('.fa-reorder').addClass('on');}});$('.evo_layout_changer').on('click','i',function(){TYPE=$(this).data('type');$(this).parent().find('i').removeClass('on');$(this).addClass('on');if(TYPE=='row'){$(this).closest('.ajde_evcal_calendar').removeClass('boxy');}else{$(this).closest('.ajde_evcal_calendar').addClass('boxy');}});} $('.evo-filter-btn').click(function(){CAL=$(this).closest('.ajde_evcal_calendar');line=CAL.find('.eventon_sorting_section');if(line.is(':visible')){line.hide();$(this).removeClass('show');}else{line.show();$(this).addClass('show');}});$('.evo-sort-btn').click(function(){line=$(this).find('.eventon_sort_line');if(line.is(':visible')){line.hide();$(this).removeClass('show');}else{line.show();$(this).addClass('show');}});$('.eventon_sort_line').on('click','p',function(){O=$(this);var CAL=$(this).closest('.ajde_evcal_calendar');var evodata=CAL.find('.evo-data');var sort_by=$(this).attr('data-val');var cal_id=evodata.parent().attr('id');ajax_post_content(sort_by,cal_id,'none','sorting');evodata.attr({'data-sort_by':sort_by});O.parent().find('p').removeClass('select');O.addClass('select');});$('.filtering_set_val').click(function(){sortSelect=$(this).closest('.eventon_sorting_section').find('.evo_srt_options');if(sortSelect.is(':visible')==true)sortSelect.fadeToggle();var obj=$(this);var current_Drop=obj.siblings('.eventon_filter_dropdown');var current_drop_pare=obj.closest('.eventon_filter');current_drop_pare.siblings('.eventon_filter').find('.eventon_filter_dropdown').each(function(){if($(this).is(':visible')==true){$(this).hide();$(this).siblings('p').removeClass('show');}});if(current_Drop.is(':visible')==true){obj.siblings('.eventon_filter_dropdown').fadeOut('fast');obj.removeClass('show');}else{obj.siblings('.eventon_filter_dropdown').fadeIn('fast');obj.addClass('show');}});$('.eventon_filter_dropdown').on('click','p',function(){var new_filter_val=$(this).data('filter_val'),O=$(this),filter_section=$(this).closest('.eventon_filter_line');var filter=$(this).closest('.eventon_filter');var filter_current_set_val=filter.attr('data-filter_val');var select_filter_type=filter_section.hasClass('selecttype')?true:false;FILTER_DROPDOWN=$(this).parent();CAL=$(this).closest('.ajde_evcal_calendar');if(select_filter_type){val='';if(new_filter_val!='all'){O.parent().find('p.all').removeClass('select');O.toggleClass('select');O.parent().find('p').each(function(){if($(this).hasClass('select')){val+=$(this).data('filter_val')+',';}});val=(val.slice(-1)==',')?val.slice(0,-1):val;}else{if(O.hasClass('select')){O.parent().find('p').removeClass('select');}else{O.parent().find('p').addClass('select');val='all';}} filter.attr('data-filter_val',val);}else{if(new_filter_val=='all'){O.parent().find('p').addClass('select');}else{O.parent().find('p').removeClass('select');O.addClass('select');}} if(filter_section.hasClass('selecttype'))return;if(filter_current_set_val==new_filter_val){$(this).parent().fadeOut();}else{var evodata=CAL.find('.evo-data');CAL_ARG=CAL.find('.cal_arguments');cal_resets(CAL);var cmonth=parseInt(evodata.attr('data-cmonth'));var cyear=parseInt(evodata.attr('data-cyear'));var sort_by=evodata.attr('data-sort_by');var cal_id=evodata.parent().attr('id');filter.attr({'data-filter_val':new_filter_val});evodata.attr({'data-filters_on':'true'});ajax_post_content(sort_by,cal_id,'none','filering');var new_filter_name=$(this).html();O.parent().fadeOut();O.parent().siblings('.filtering_set_val').removeClass('show');}});$('.eventon_filter_dropdown').on('change','input',function(event){FILTER=$(this).closest('.eventon_filter');val='';FILTER.find('input').each(function(){val=($(this).is(':checked'))?val+$(this).attr('data-filter_val')+',':val;});val=val==''?'':val;FILTER.attr('data-filter_val',val);});$('body').on('click','.evo_filter_submit',function(){$(this).closest('.eventon_filter_line').find('.eventon_filter_dropdown').fadeOut();$(this).closest('.eventon_filter_line').find('.filtering_set_val').removeClass('show');CAL=$(this).closest('.ajde_evcal_calendar');cal_resets(CAL);var evodata=$(this).closest('.eventon_sorting_section').siblings('.evo-data');var cmonth=parseInt(evodata.attr('data-cmonth'));var cyear=parseInt(evodata.attr('data-cyear'));var sort_by=evodata.attr('data-sort_by');var cal_id=evodata.parent().attr('id');evodata.attr({'data-filters_on':'true'});ajax_post_content(sort_by,cal_id,'none','filering');});$('body').on('click','.evcal_btn_prev',function(){var evodata=$(this).parent().siblings('.evo-data');var sort_by=evodata.attr('data-sort_by');cal_id=$(this).closest('.ajde_evcal_calendar').attr('id');ajax_post_content(sort_by,cal_id,'prev','switchmonth');});$('body').on('click','.evcal_btn_next',function(){var evodata=$(this).parent().siblings('.evo-data');var sort_by=evodata.attr('data-sort_by');cal_id=$(this).closest('.ajde_evcal_calendar').attr('id');ajax_post_content(sort_by,cal_id,'next','switchmonth');});function ajax_post_content(sort_by,cal_id,direction,ajaxtype){var ev_cal=$('#'+cal_id);var cal_head=ev_cal.find('.calendar_header');var evodata=ev_cal.find('.evo-data');if(ev_cal.attr('data-runajax')!='0'){$('body').trigger('evo_main_ajax',[ev_cal,evodata,ajaxtype]);var cat=ev_cal.find('.evcal_sort').attr('cat');if(ajaxtype=='switchmonth'){cal_head.find('.cal_arguments').attr('data-show_limit_paged',1);} var data_arg={action:'the_ajax_hook',direction:direction,sort_by:sort_by,filters:ev_cal.evoGetFilters(),shortcode:ev_cal.evo_shortcodes(),evodata:ev_cal.evo_getevodata(),ajaxtype:ajaxtype};data_arg=cal_head.evo_otherVals({'data_arg':data_arg});$.ajax({beforeSend:function(){ev_cal.addClass('evo_loading');if(ajaxtype!='paged')ev_cal.find('.eventon_events_list').slideUp('fast');ev_cal.evo_loader_animation();},type:'POST',url:the_ajax_script.ajaxurl,data:data_arg,dataType:'json',success:function(data){if(!data)return false;if(ajaxtype=='paged'){EVENTS_LIST=ev_cal.find('.eventon_events_list');ev_cal.find('.eventon_events_list .evoShow_more_events').remove();EVENTS_LIST.find('.clear').remove();EVENTS_LIST.append(data.content+"
");}else{ev_cal.find('.eventon_events_list').html(data.content);} animate_month_switch(data.cal_month_title,ev_cal.find('#evcal_cur'));evodata.attr({'data-cmonth':data.month,'data-cyear':data.year});change_jumper_set_values(cal_id);if(ev_cal.find('.evo_j_container').length>0){JUMPER=ev_cal.find('.evo_j_container');JUMPERmo=JUMPER.find('.evo_jumper_months');JUMPERmo.find('a').removeClass('set');JUMPERmo.find('a[data-val="'+data.month+'"]').addClass('set');JUMPERyr=JUMPER.find('.evo_j_years');JUMPERyr.find('a').removeClass('set');JUMPERyr.find('a[data-val="'+data.year+'"]').addClass('set');} $('body').trigger('evo_main_ajax_success',[ev_cal,evodata,ajaxtype,data.eventList]);},complete:function(data){ev_cal.evo_loader_animation({direction:'end'});ev_cal.find('.eventon_events_list').delay(300).slideDown('slow');ev_cal.evoGenmaps({'delay':400});init_run_gmap_openevc(600);fullheight_img_reset(cal_id);$('body').trigger('evo_main_ajax_complete',[ev_cal,evodata,ajaxtype,data.eventList]);ev_cal.removeClass('evo_loading');}});}} function animate_month_switch(new_data,title_element){var current_text=title_element.html();var hei=title_element.height();var wid=title_element.width();title_element.html(""+current_text+""+new_data+"").width(wid);title_element.find('span:first-child').fadeOut(800);title_element.find('span:last-child').fadeIn(800,function(){title_element.html(new_data).width('');});} $('body').on('click','.eventon_shad_p',function(){control_more_less($(this));});function control_more_less(obj){var content=obj.attr('content');var current_text=obj.find('.ev_more_text').html();var changeTo_text=obj.find('.ev_more_text').attr('data-txt');if(content=='less'){var hei=obj.parent().siblings('.eventon_full_description').height();var orhei=obj.closest('.evcal_evdata_cell').height();obj.closest('.evcal_evdata_cell').attr({'orhei':orhei}).animate({height:(parseInt(hei)+40)});obj.attr({'content':'more'});obj.find('.ev_more_arrow').addClass('less');obj.find('.ev_more_text').attr({'data-txt':current_text}).html(changeTo_text);}else{var orhei=parseInt(obj.closest('.evcal_evdata_cell').attr('orhei'));obj.closest('.evcal_evdata_cell').animate({height:orhei});obj.attr({'content':'less'});obj.find('.ev_more_arrow').removeClass('less');obj.find('.ev_more_text').attr({'data-txt':current_text}).html(changeTo_text);}} $('body').on('click','.evcal_evdata_img',function(){if(!$(this).hasClass('evo_noclick')){feature_image_expansion($(this),'click');}});function feature_image_expansion(image,type){img=image;var img_status=img.attr('data-status');var img_style=img.attr('data-imgstyle');if(img_status=='open'){img.attr({'data-status':'close'}).css({'height':''});}else{var img_full_height=parseInt(img.attr('data-imgheight'));var cal_width=parseInt(img.closest('.ajde_evcal_calendar').width());cal_width=(cal_width)?cal_width:img.width();var img_full_width=parseInt(img.attr('data-imgwidth'));if(img_style=='100per'){relative_height=img_full_height;}else if(img_style=='full'){relative_height=parseInt(img_full_height*(cal_width/img_full_width));}else{if(type=='click'){relative_height=parseInt(img_full_height*(cal_width/img_full_width));relative_height=(relative_height)?relative_height:img_full_height;relative_height=parseInt((cal_width*img_full_height)/img_full_width);}else{relative_height=img.attr('data-minheight');}} if(img_status==''&&img_style=='minmized'){img.attr({'data-status':'close'}).removeClass('expanded');}else{img.attr({'data-status':'open'}).addClass('expanded');} img.css({'height':relative_height});}} function fullheight_img_reset(calid){if(calid){$('#'+calid).find('.eventon_list_event .evo_metarow_fimg').each(function(){feature_image_expansion($(this));});}else{$('.evo_metarow_fimg').each(function(){feature_image_expansion($(this));});}} function treat_events(calid){if(calid!=''){if(is_mobile()){$('#'+calid).find('.evo_metarow_getDr form').attr({'target':'_self'});}}} function is_mobile(){return(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))?true:false;} $('body').on('click','.editEventBtnET',function(event){event.stopPropagation();href=$(this).attr('href');window.open(href);});$('body').on('click','.evo_repeat_series_date',function(){if($(this).parent().data('click')){URL=$(this).data('l');window.location=URL;}});$('body').find('.evo_location_map').each(function(){THIS=$(this);MAPID=THIS.attr('id');var location_type=THIS.attr('data-location_type');if(location_type=='add'){var address=THIS.attr('data-address');var location_type='add';}else{var address=THIS.attr('data-latlng');var location_type='latlng';} zoom=parseInt(THIS.data('zoom'));scrollwheel=THIS.data('scroll')=='yes'?true:false;initialize(MAPID,address,THIS.data('mty'),zoom,location_type,scrollwheel);});$('body').on('evo_load_single_event_content',function(event,eid,obj){var ajaxdataa={};ajaxdataa['action']='eventon_load_event_content';ajaxdataa['eid']=eid;ajaxdataa['nonce']=the_ajax_script.postnonce;if(obj.data('j')){$.each(obj.data('j'),function(index,val){ajaxdataa[index]=val;});} $.ajax({beforeSend:function(){},url:the_ajax_script.ajaxurl,data:ajaxdataa,dataType:'json',type:'POST',success:function(data){$('body').trigger('evo_single_event_content_loaded',[data,obj]);},complete:function(){}});});if(is_mobile()){if($('body').find('.fb.evo_ss').length!=0){$('body').find('.fb.evo_ss').each(function(){obj=$(this);obj.attr({'href':'http://m.facebook.com/sharer.php?u='+obj.attr('data-url')});});}} if($('body').find('.evo_sin_page').length>0){$('.evo_sin_page').each(function(){$('body').trigger('evo_load_single_event_content',[$(this).data('eid'),$(this)]);$(this).find('.desc_trig ').attr({'data-ux_val':'none'});});} $('.eventon_single_event').on('click','.evcal_list_a',function(event){var obj=$(this),evodata=obj.closest('.ajde_evcal_calendar').find('.evo-data'),ux_val=evodata.data('ux_val');event.preventDefault();if(ux_val==4){var url=obj.parent().siblings('.evo_event_schema').find('[itemprop=url]').attr('href');window.location.href=url;}else if(ux_val=='2'){var url=evodata.attr('data-exturl');window.location.href=url;}else if(ux_val=='X'){return false;}}) $('.eventon_single_event').find('.evcal_list_a').each(function(){var obj=$(this),evObj=obj.parent(),evodata=obj.closest('.ajde_evcal_calendar').find('.evo-data');var ev_link=evObj.siblings('.evo_event_schema').find('a[itemprop=url]').attr('href');if(ev_link!=''){obj.attr({'href':ev_link,'data-exlk':'1'});} var ev_excerpt=evObj.siblings('.evcal_eventcard').find('.event_excerpt').html();if(ev_excerpt!=''&&ev_excerpt!==undefined&&evodata.data('excerpt')=='1'){var appendation='
'+ev_excerpt+'
' evObj.append(appendation);}});$('body').find('.eventon_single_event').each(function(){var _this=$(this);if(_this.find('.evo-data').data('expanded')=='1'){_this.find('.evcal_eventcard').show();var idd=_this.find('.evcal_gmaps');_this.find('.evcal_close').parent().css({'padding-right':0});_this.find('.evcal_close').hide();var obj=_this.find('.desc_trig');obj.evoGenmaps({'fnt':2});}else if(_this.data('uxval')=='3'){var obj=_this.find('.desc_trig');obj.removeAttr('data-exlk').attr({'data-ux_val':'3'});}}) $('body').on('click','.ajde_yn_btn ',function(){var obj=$(this);var afterstatement=obj.attr('afterstatement');afterstatement=(afterstatement===undefined)?obj.attr('data-afterstatement'):afterstatement;if(obj.hasClass('NO')){obj.removeClass('NO');obj.siblings('input').val('yes');if(afterstatement!=''){var type=(obj.attr('as_type')=='class')?'.':'#';$(type+afterstatement).addClass('tt').slideDown('fast');}}else{obj.addClass('NO');obj.siblings('input').val('no');if(afterstatement!=''){var type=(obj.attr('as_type')=='class')?'.':'#';$(type+afterstatement).slideUp('fast');}}});$.fn.evo_enterKey=function(fnc){return this.each(function(){$(this).keypress(function(ev){var keycode=(ev.keyCode?ev.keyCode:ev.which);if(keycode=='13'){fnc.call(this,ev);}})})} $('.evo-search').on('click',function(){var section=$(this).closest('.calendar_header');var item=section.find('.evo_search_bar');item.slideToggle('2000',function(){if(item.is(':visible'))item.find('input').focus();});});$('body').on('click','.evo_do_search',function(){do_search_box($(this));});$(".evosr_search_box input").evo_enterKey(function(){do_search_box($(this).siblings('.evo_do_search'));});function do_search_box(OBJ){SearchVal=OBJ.closest('.evosr_search_box').find('input').val();Evosearch=OBJ.closest('.EVOSR_section');OBJ.closest('.evo_search_entry').find('.evosr_msg').hide();if(SearchVal===undefined||SearchVal==''){OBJ.closest('.evo_search_entry').find('.evosr_msg').show();return false;} SC=Evosearch.find('span.data').evo_item_shortcodes();var data_arg={action:'eventon_search_evo_events',search:SearchVal,shortcode:SC};$.ajax({beforeSend:function(){Evosearch.find('.evo_search_results_count').hide();Evosearch.addClass('searching');},type:'POST',url:the_ajax_script.ajaxurl,data:data_arg,dataType:'json',success:function(data){Evosearch.find('.evo_search_results').html(data.content);if(Evosearch.find('.no_events').length>0){}else{Events=Evosearch.find('.evo_search_results').find('.eventon_list_event').length;Evosearch.find('.evo_search_results_count span').html(Events);Evosearch.find('.evo_search_results_count').fadeIn();}},complete:function(){Evosearch.removeClass('searching');}});} $('body').on('click','.evosr_search_btn',function(){search_within_calendar($(this).siblings('input'));});$(".evo_search_bar_in input").evo_enterKey(function(){search_within_calendar($(this));});function search_within_calendar(obj){var ev_cal=obj.closest('.ajde_evcal_calendar');ev_cal.find('.cal_arguments').attr({'data-s':obj.val()});var cal_head=ev_cal.find('.calendar_header');var evodata=ev_cal.find('.evo-data');var evcal_sort=cal_head.siblings('div.evcal_sort');var sort_by=evcal_sort.attr('sort_by');var evodata=ev_cal.evo_getevodata();var data_arg={action:'the_ajax_hook',sort_by:sort_by,direction:'none',filters:ev_cal.evoGetFilters(),shortcode:ev_cal.evo_shortcodes(),evodata:evodata};data_arg=cal_head.evo_otherVals({'data_arg':data_arg});$.ajax({beforeSend:function(){ev_cal.find('.eventon_events_list').slideUp('fast');ev_cal.find('#eventon_loadbar').slideDown();},type:'POST',url:the_ajax_script.ajaxurl,data:data_arg,dataType:'json',success:function(data){ev_cal.find('.eventon_events_list').html('');ev_cal.find('.eventon_events_list:first').html(data.content);},complete:function(){ev_cal.find('#eventon_loadbar').slideUp();ev_cal.find('.eventon_events_list').delay(300).slideDown('slow');ev_cal.evoGenmaps({'delay':400});$('body').trigger('evo_search_results_ajax_complete',[ev_cal,evodata,data_arg]);}});if(ev_cal.hasClass('evoDV')){var data_arg_3={action:'the_ajax_daily_view',next_m:evodata.cmonth,next_y:evodata.cyear,next_d:data_arg.dv_focus_day,cal_id:ev_cal.attr('id'),send_unix:evodata.send_unix,filters:ev_cal.evoGetFilters(),shortcode:ev_cal.evo_shortcodes(),};$.ajax({beforeSend:function(){},type:'POST',url:the_ajax_script.ajaxurl,data:data_arg_3,dataType:'json',success:function(data){var this_section=cal_head.parent().find('.eventon_daily_in');this_section.html(data.days_list);}});} if(ev_cal.hasClass('evoWV')){var data_arg_4={action:'the_ajax_wv2',next_m:evodata.cmonth,next_y:evodata.cyear,focus_week:data_arg.wv_focus_week,filters:ev_cal.evoGetFilters(),shortcode:ev_cal.evo_shortcodes(),};$.ajax({beforeSend:function(){},type:'POST',url:the_ajax_script.ajaxurl,data:data_arg_4,dataType:'json',success:function(data){var width1=ev_cal.find('.evoWV_days').width();var width2=ev_cal.find('.eventon_wv_days').width();var width3=ev_cal.find('.evo_wv_day').width();var ml1=ev_cal.find('.eventon_wv_days').css('margin-left');ev_cal.find('.eventon_wv_days').parent().html(data.content);ev_cal.find('.evoWV_days').css({'width':width1});ev_cal.find('.eventon_wv_days').css({'width':width2,'margin-left':ml1});ev_cal.find('.evo_wv_day').css({'width':width3});}});}} $('body').on('click','.evo_event_more_img',function(){var O=$(this);var eCARD=O.closest('.evcal_eventcard');var fIMG=O.find('img');var fURL=fIMG.data('f');O.parent().find('span').removeClass('select');O.addClass('select');eCARD.find('img.evo_event_main_img').attr({'src':fURL});relIMG=eCARD.find('.evo_metarow_fimg');relIMG.css('background-image','url('+fURL+')');relIMG.data('imgheight',fIMG.data('h'));});});